package com.iwat.listener;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;

/**
 * @author wangweiqiang
 * @version 1.0
 * @date 2021-08-16 23:36
 */
public class MyTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        if (delegateTask.getName().equals("start")&&delegateTask.getProcessDefinitionId().equals("evection2:1:47504")&& delegateTask.getEventName().equals("create")){
            delegateTask.setAssignee("zhangsan");
        }
    }
}
